package homework.api.day05;

import java.io.File;
import java.io.FileFilter;
import java.io.FilenameFilter;

public class Test06 {
    public static void main(String[] args) {
        File dir = new File("./");
        File[] subs1 = dir.listFiles(f->f.getName().contains("s"));

        File[] subs2 = dir.listFiles(new FileFilter() {
            public boolean accept(File file) {
                return file.getName().contains("s");
            }
        });

        for (File f : subs1){
            System.out.println(f.getName());
        }

        for (File f : subs2){
            System.out.println(f.getName());
        }

    }
}
